/*
 * @Autor: Jackey
 * @Date: 2025-07-02 17:53:53
 * @LastEditTime: 2025-07-17 10:09:40
 * @Description: 
 */
package org.springblade.modules.repair.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springblade.modules.repair.entity.MaintainReport;

import java.util.List;
import java.util.Map;

public interface MaintainReportMapper extends BaseMapper<MaintainReport> {
  MaintainReport selectReportByWxPlan(Long planId);

  Integer selectReportByWxCount(Long planId);

  MaintainReport selectReportDetail(Long reportId);

  /**
   * 慢SQL查询 - 测试慢SQL告警和数据库插入功能
   * 执行时间约3秒，确保触发慢SQL阈值(1000ms)
   */
  @Select("SELECT id, SLEEP(3) as sleep_result FROM blade_attach LIMIT 1;")
  List<Map<String, Object>> executeSlowQuery();
}
